package com.googlecode.xpathproxy.conversion.base;

import com.googlecode.xpathproxy.conversion.AbstractConverter;

import javax.xml.namespace.QName;
import javax.xml.xpath.XPathConstants;

/**
 * @author Ray Krueger
 */
public abstract class AbstractInputStringConverter<T> extends AbstractConverter<T> {

    public final QName getExpectedInput() {
        return XPathConstants.STRING;
    }

    public final T convert(Object input) {
        return convertString((String) input);
    }

    protected abstract T convertString(String input);
}
